<?php

namespace app\controller\api;

use app\model\Slide;
use think\facade\Lang;

class BannerController extends BaseController
{


    /**
     * 获取banner详情
     * */
    public function index(Slide $slide): \think\response\Json
    {

        $where = [
            'seller_id' => 1,
            'slide_cate_id' => 1,
        ];
        $slideList = $slide->getAllCustomArrayData($where,'sort desc','*',['attachment'=>function($q){
            $q->field('id,name,url,type');
        }]);
        return json($slideList);
    }

}
